package org.cs.mgr.before.dao.impl;

import java.util.List;

import org.cs.core.dao.impl.BaseDao;
import org.cs.mgr.before.dao.IGoodsDao;
import org.cs.mgr.before.model.Goods;
import org.springframework.stereotype.Repository;

//首页
@Repository
public class GoodsDao extends BaseDao<Goods> implements IGoodsDao {
    
	@Override
	public List<Goods> getGoodsList() {                   //查询goods表
		List<Goods>    goodslist = (List<Goods>) this.findByHql("from Goods",null);     
		return goodslist;
	}

	@Override
	public Goods getGood(String id) {                     //通过id查goods表
	     Goods goods = this.findById(id);
		return goods;
	}
               
	
}
